<?php
/**
 * Cloud model
 *
 * PHP version 5
 *
 * @category   Web
 * @package    Data2People
 * @subpackage Models
 * @author     Mike Bevz <mike.bevz@data2people>
 * @copyright  2007-2008 (c) Mike Bevz
 * @license    The BSD License http://data2people.com/license.txt
 * @version    SVN: $Id: Cloud.php 13 2008-12-01 16:16:50Z michael.bevz $
 *
 */
/**
 * Includes
 */
require_once 'BaseClasses/BaseCloud.php';


/**
 * Cloud model class
 *
 * PHP version 5
 *
 * @category   Web
 * @package    Data2People
 * @subpackage Models
 * @author     Mike Bevz <mike.bevz@data2people>
 * @copyright  2007-2008 (c) Mike Bevz
 * @license    The BSD License http://data2people.com/license.txt
 * @version    SVN: $Id: Cloud.php 13 2008-12-01 16:16:50Z michael.bevz $
 *
 */
class Cloud extends BaseCloud
{
    /**
     * Return word object by its value
     *
     * @param String $word
     *
     * @return Doctrine_Collection
     */
    public function getByDate($date)
    {
        if (!is_string($date)) {
            throw new TV_Model_Exception(__METHOD__ .
                      ': the method requires string as argument, got ' .
                      gettype($date));
        }
        
        $cloud = Doctrine_Query::create()->from('Cloud')
                                        ->addWhere('pubdate =?', array($date))
                                        ->execute();
        return $cloud;
    }
    
   
    
}